<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<ui:composition xmlns="http://www.w3.org/1999/xhtml"
                xmlns:ui="http://java.sun.com/jsf/facelets"
                xmlns:h="http://java.sun.com/jsf/html"
                xmlns:f="http://java.sun.com/jsf/core"
                xmlns:p="http://primefaces.org/ui"
                template="plantillas/base.xhtml">
    <ui:param name="titulo" value="AgileFalcon"/>
    <ui:define name="content">
        <f:view>
            <h:form id="login_form">
                <p:messages id="messages"  autoUpdate="true"/>  
                <p:fieldset legend="Data Connection">  
                    <h:panelGrid columns="2" cellpadding="10">
                        <p:panel style="margin: 20px 0 0 20px">
                            <h:outputLabel value="Data Source Connection" style="font-size: 22px;font: bold"/>
                            <p:panelGrid columns="2">
                                <h:outputLabel value="Data Base Type"/>
                                <p:selectOneMenu value="#{beanConexionDB.sourceDataBaseType}">
                                    <f:selectItem itemLabel="Oracle" itemValue="Oracle" />
                                    <f:selectItem itemLabel="MySQL" itemValue="MySQL" />
                                    <f:selectItem itemLabel="MSSQL" itemValue="MSSQL" />
                                    <f:selectItem itemLabel="PostgreSQL" itemValue="PostgreSQL" />
                                </p:selectOneMenu>
                                <h:outputLabel value="Ip Server"/>
                                <p:inputText value="#{beanConexionDB.sourceIpServer}"/>

                                <h:outputLabel value="Port"/>
                                <p:inputText value="#{beanConexionDB.sourcePort}"/>

                                <h:outputLabel value="Service Name"/>
                                <p:inputText value="#{beanConexionDB.sourceServiceName}"/>

                                <h:outputLabel value="Data Base Name"/>
                                <p:inputText value="#{beanConexionDB.sourceDataBaseName}"/>

                                <h:outputLabel value="User"/>
                                <p:inputText value="#{beanConexionDB.sourceUser}"/>

                                <h:outputLabel value="Password"/>
                                <p:inputText value="#{beanConexionDB.sourcePassword}"/>
                            </p:panelGrid>
                        </p:panel>
                        <p:panel style="margin: 20px 0 0 20px">
                            <h:outputLabel value="Data Destiny Connection" style="font-size: 22px;font: bold"/>
                            <p:panelGrid columns="2">
                                <h:outputLabel value="Data Base Type"/>
                                <p:selectOneMenu value="#{beanConexionDB.destinyDataBaseType}">
                                    <f:selectItem itemLabel="Oracle" itemValue="Oracle" />
                                    <f:selectItem itemLabel="MySQL" itemValue="MySQL" />
                                    <f:selectItem itemLabel="MSSQL" itemValue="MSSQL" />
                                    <f:selectItem itemLabel="PostgreSQL" itemValue="PostgreSQL" />
                                </p:selectOneMenu>
                                <h:outputLabel value="Ip Server"/>
                                <p:inputText value="#{beanConexionDB.destinyIpServer}"/>

                                <h:outputLabel value="Port"/>
                                <p:inputText value="#{beanConexionDB.destinyPort}"/>

                                <h:outputLabel value="Service Name"/>
                                <p:inputText value="#{beanConexionDB.destinyServiceName}"/>

                                <h:outputLabel value="Data Base Name"/>
                                <p:inputText value="#{beanConexionDB.destinyDataBaseName}"/>

                                <h:outputLabel value="User"/>
                                <p:inputText value="#{beanConexionDB.destinyUser}"/>

                                <h:outputLabel value="Password"/>
                                <p:inputText value="#{beanConexionDB.destinyPassword}"/>
                            </p:panelGrid>
                        </p:panel>
                    </h:panelGrid>
                    <h:panelGrid columns="2">                        
                        <p:commandButton value="Next" style="width: 125px" ajax="false"
                                         action="#{beanConexionDB.conectar}"/>
                    </h:panelGrid>
                </p:fieldset>
            </h:form>
        </f:view>
    </ui:define>
</ui:composition>